package com.hanyxx.thread;

/**
 * @author layman
 * @date 2021/2/4
 */
public class ThreadDemo02 {
    public static void main(String[] args) {
        Demo02 demo02 = new Demo02();
        Thread t= new Thread(demo02);
        t.start();
    }
}
class Demo02 implements  Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"--->"+i);
        }
    }
}
